<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$type['title']}-{$GLOBALS['S']['title']}</title>
<meta name="keywords" content="{$type['keywords']} " />
<meta name="description" content="{$type['description']} " />
<link href="{$GLOBALS['TURL']}style/style.css" rel="stylesheet" type="text/css" />
<script src="{$GLOBALS['WWW']}include/js/jquery.js" type="text/javascript"></script>
<script src="{$GLOBALS['WWW']}include/js/DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="{$GLOBALS['WWW']}include/js/jquery.v.js" type="text/javascript"></script>
<script src="{$GLOBALS['WWW']}include/js/jquery.v.m.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	$("#mform").validate({
		errorElement :"span",// 使用"span"标签标记错误
		rules: {
			title: {
				required: true
			}{if($GLOBALS['G_DY']['vercode']==1)},
			vercode: {
				required: true,
				remote:{
					type: "POST",
					cache: false, 
					url: "/index.php?c=message&a=vercode",
					data: {vercode: function(){return $("#vercode").val();}}
					}
			}
			{/if}
		},
		messages: {
			title: {
				required: "请输入标题"
			}{if($GLOBALS['G_DY']['vercode']==1)},
			vercode: {
				required: "请输入验证码",
				remote: "验证码错误"
			}
			{/if}
		},
		errorPlacement: function(error, element) {
			error.appendTo(element.parent('dd').parent('dl').children(".m"));
		}
	});
});
</script>
<script src="{$GLOBALS['WWW']}include/js/xheditor/xheditor-zh-cn.min.js" charset="utf-8" type="text/javascript"></script>
</head>

<body>
{include="head.html"}
<div class="wpm list">
  <div class="tab11"></div>
  <div class="tab1 tab1b main">
    <div class="l">
      <div class="columnc"><h2>{$type['classname']}</h2></div>
      <div class="columncl">
      {loop table="classtype" pid="$type["tid"]" not="1" as="t"}
      <a href="{$t['url']}"{if($type['tid']==$t['tid'])} class="c"{/if}>{$t['classname']} </a>
      {/loop}
      </div>
    </div>
    <div class="r">
    <div class="content">
       <div class="position">当前位置：{$positions}</div>
       <div class="member_f">
<form action="{$GLOBALS['WWW']}index.php?c=message&a=add&tid={$type['tid']}" method="post" id="mform">
       {foreach $fields as $v}
       <dl><dt>{$v['name']}</dt><dd>{$v['input']}</dd><dd class="m">{$v['m']}</dd></dl>
       {/foreach}
{if($GLOBALS['G_DY']['vercode']==1)}
<script type="text/javascript">
function newvercode(){
	document.getElementById("vercodeimg").src="{$GLOBALS['WWW']}include/vercode.php?a="+Math.random();
}
</script>
       <dl><dt>验证码：</dt><dd><input type="text" name="vercode" id="vercode" class="inp" style="width:80px;"/></dd><dd><img src="{$GLOBALS['WWW']}include/vercode.php" id="vercodeimg" width="60" height="25" onclick="newvercode();" style="cursor:pointer;" /></dd><dd class="m"></dd></dl>
{/if}
       <dl style="border:0;"><dt>&nbsp;</dt><dd><input name="" type="submit" value="提交留言" class="btnbig" /></dd></dl>
</form>
       </div>
    </div>
	<div class="comment">
         <div class="t c">留言列表</div>
         <div class="list">
         {foreach $lists as $s}
         <dl><dt>{$s['user']} 发布于 {fun date('Y-m-d H:i:s',$s['addtime'])}</dt>
         <dd>{foreach $fields_r as $f}{$f['name']}：{$s[$f['fields']]}<br />{/foreach}</dd>
         <dd>{$s['body']}{if($s['reply'])}<br /><span style="color:#C00">管理员回复：{$s['reply']}</span>{/if}</dd></dl>
         {/foreach}
         </div>
	</div>
	<ul class="c pages">{$pages}</ul>
    </div>
  </div>
  <div class="tab12 mban"></div>
</div>
{include="bottom.html"}
</body>
</html>
